<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>信息中心</title>
    <link rel="stylesheet" href="../../../../css/twocss/public.css">
    <link rel="stylesheet" href="../../../../public/dist/css/layui.css">
    <link rel="stylesheet" href="../../../../css//twocss/amessage.css">
    <link rel="stylesheet" href="../../../../public/font/iconfont.css">
    <!-- <link rel="stylesheet" href="../../../../css/twocss/commit.css"> -->
</head>

<body>
    <div class="mess-com">
        <div class="message-top">
            <p class="mess-refresh">
                <span class="layui-bg-green"></span>
                <label>订单进度</label>
                <i class="layui-icon layui-icon-refresh"></i>
            </p>

            <div class="mess-schedule">
                <div class="mess-schedule-sole">
                    <div class="mess-schedule-sole-tex  layui-bg-green">销售</div>
                    <ul>
                        <li>
                            <label>待接单</label>
                            <i class="iconfont icon-you"></i>
                            <a class="layui-bg-green" href="javascript:;">0</a>
                        </li>
                        <li>
                            <i class="iconfont icon-you"></i>
                            <label>待审批</label>
                            <a class="layui-bg-green" href="javascript:;">0</a>
                        </li>
                        <li style="width:120px;">
                            <i class="iconfont icon-you"></i>
                            <label>待对方确定</label>
                            <a class="layui-bg-green" href="javascript:;">0</a>
                        </li>
                        <li>
                            <i class="iconfont icon-you"></i>
                            <label>待发货</label>
                            <a class="layui-bg-green" href="javascript:;">0</a>
                        </li>
                        <li>
                            <i class="iconfont icon-you"></i>
                            <label>待收款</label>
                            <a class="layui-bg-green" href="javascript:;">0</a>
                        </li>
                        <li>
                            <label>已完成</label>
                            <a class="layui-bg-green" href="javascript:;" style="margin-right:10px;">10</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="mess-purchase" style="margin-top:9px;">
                <div class="mess-purchase-caigou">
                    <div class="mess-schedule-sole-tex  layui-bg-cyan">采购</div>
                    <ul>
                        <li>
                            <label>待接单</label>
                            <i class="iconfont icon-you"></i>
                            <a href="javascript:;">0</a>
                        </li>
                        <li>
                            <i class="iconfont icon-you"></i>
                            <label>待审批</label>
                            <a href="javascript:;">0</a>
                        </li>
                        <li style="width:120px;">
                            <i class="iconfont icon-you"></i>
                            <label>待对方确定</label>
                            <a href="javascript:;">0</a>
                        </li>
                        <li>
                            <i class="iconfont icon-you"></i>
                            <label>待发货</label>
                            <a href="javascript:;">0</a>
                        </li>
                        <li>
                            <i class="iconfont icon-you"></i>
                            <label>待收款</label>
                            <a href="javascript:;">0</a>
                        </li>
                        <li>
                            <label>已完成</label>
                            <a href="javascript:;" style="margin-right:10px;">10</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- 待办分类 -->
    <div class="kongbai"></div>
    <div class="message-in">
        <p class="mess-refresh">
            <span class="layui-bg-green"></span>
            <label>待办分类</label>
            <i class="layui-icon layui-icon-refresh"></i>
        </p>

        <div class="mess-classify">
            <div class="mess-points layui-bg-green">
                <i class="layui-icon layui-icon-form"></i>
                <div class="mess-points-r">
                    <p>10</p>
                    <label>待审批单据</label>
                </div>
            </div>
            <div class="mess-points layui-bg-orange">
                <i class="layui-icon layui-icon-engine"></i>
                <div class="mess-points-r">
                    <p>10</p>
                    <label>预警消息</label>
                </div>
            </div>
            <div class="mess-points layui-bg-red">
                <i class="layui-icon layui-icon-tips"></i>
                <div class="mess-points-r">
                    <p>10</p>
                    <label>已逾期工作</label>
                </div>
            </div>
        </div>
    </div>
    <!-- 最新信息 -->
    <div class="kongbai"></div>
    <div class="message-foot">
        <p class="mess-refresh">
            <span class="layui-bg-green"></span>
            <!-- <label>最新信息</label> -->
            <label>消息管理</label>
        </p>

        <div class="mess-data">
            <div class="layui-tab layui-tab-brief" lay-filter="messdeno" style="margin:0;">
                <ul class="layui-tab-title" style="background-color:#f2f2f2;">
                    <li class="select-type-item select-type-show">全部</li>
                    <li class="select-type-item">未查看</li>
                    <li class="select-type-item">已查看</li>
                    <li class="select-type-item">处理中</li>
                    <li class="select-type-item">已处理</li>
                    <div class="mess-data-more"><a href='./manage.html'>查看更多>></a></div>
                    <!-- <li><i class="layui-icon layui-icon-refresh">刷新</i></li> -->
                </ul>
                <!-- <div class="layui-tab-content" style="padding:0;">
                    <div class="layui-tab-item layui-show">
                        <div class="mess-check">
                            <div class="layui-inline">
                                <label class="layui-form-label mess-time">日期:</label>
                                <div class="layui-input-inline mess-time-c">
                                    <input type="text" class="layui-input mess-input" id="messtest">
                                    <label>—</label>
                                    <input type="text" class="layui-input mess-input" id="messtest2">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label mess-time">单号:</label>
                                <div class="layui-input-inline mess-time-c">
                                    <input type="text" class="layui-input mess-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label mess-time">关键字:</label>
                                <div class="layui-input-inline mess-time-c">
                                    <input type="text" class="layui-input mess-input">
                                </div>
                            </div>
                            <button class="layui-btn layui-bg-red layui-btn-sm">查询</button>
                            <button class="layui-btn layui-bg-red layui-btn-sm">清空</button>
                        </div>
                        <div class="mess-data-com">
                            <table id="alldemo" lay-filter="messdata" style="height:100%;"></table>
                        </div>
                    </div>
                    <div class="layui-tab-item">内容2</div>
                    <div class="layui-tab-item">内容3</div>
                    <div class="layui-tab-item">内容4</div>
                    <div class="layui-tab-item">内容5</div>
                </div> -->
            </div>

            <div class="common-padding">
                <!-- 查询 -->
                <div class="mess-check" style="margin: 15px 0;">
                    <div class="layui-inline">
                        <label class="layui-form-label mess-time">单号:</label>
                        <div class="layui-input-inline mess-time-c">
                            <input type="text" class="layui-input mess-input" name="s1" search-type="s1" id="s1" style=" margin-right: 20px;width: 200px;">
                        </div>
                    </div>
                    <div class="layui-inline" style="display: none">
                        <label class="layui-form-label mess-time"></label>
                        <div class="layui-input-inline mess-time-c">
                            <input type="text" class="layui-input mess-input" name="s3" search-type="s3" id="s3">
                        </div>
                    </div>
                    <button class="layui-btn layui-bg-red layui-btn-sm " lay-event="search">查询</button>
                    <button class="layui-btn layui-bg-red layui-btn-sm" lay-event="reset">清空</button>
                </div>
                <table class="layui-hide" id="testdome" lay-filter="testdome"></table>
            </div>
        </div>
    </div>
    </div>


</body>
<script src="../../../../public/dist/layui.js"></script>
<script src="../../../../js/common/api.js"></script>

</html>

<script>
    layui.config({
        base: '../../../../js/module/'
    }).use(['Services', 'jquery'], function() {
        var $ = layui.jquery;
        var seeType = '';
        var dataType = 'myman';
        var typeItem = document.querySelectorAll('.select-type-item');
        for (var i = 0; i < typeItem.length; i++) {
            (function(i) {
                typeItem[i].addEventListener('click', function() {
                    document.querySelector('.select-type-show').classList.remove('select-type-show');
                    typeItem[i].classList.add('select-type-show');
                    if (i == 0) {
                        seeType = '';
                        document.querySelector('#s3').value = '';
                        getServices();

                    } else {
                        seeType = i;
                        document.querySelector('#s3').value = seeType;
                        getServices();
                    }
                })
            })(i)
        }
        getServices();

        function getServices() {

            var services = new layui.Services({
                baseURL: baseaip,
                tableId: "testdome",
                toolbar: "#toolbarinter",
                serachUrl: "dictionaries/query",
                getUrl: "dictionaries/get",
                delUrl: "dictionaries/delete",
                updUrl: "plant/updateNcpxx",
                saveUrl: "./dialog/manageDialog.html",
                deleteField: "id",
                dataType: dataType,
                parameter: {
                    keyword: document.querySelector('#s1').value + '|' + seeType,
                    type: dataType
                },
                cols: [
                    [{
                        type: 'checkbox',
                        fixed: 'left'
                    }, {
                        field: 's1',
                        sort: true,
                        title: '单号',
                        templet: function(data) {

                            return (JSON.parse(data.context)).s1
                        }
                    }, {
                        field: 's2',
                        sort: true,
                        title: '简称',
                        templet: function(data) {

                            return (JSON.parse(data.context)).s2
                        }
                    }, {
                        field: 's4',
                        sort: true,
                        title: '平台账号',
                        templet: function(data) {

                            return (JSON.parse(data.context)).s4
                        }
                    }, {
                        field: 's2',
                        sort: true,
                        title: '单据信息',
                        templet: function(data) {

                            return (JSON.parse(data.context)).s2
                        }
                    }, {
                        field: 's6',
                        sort: true,
                        title: '时间',
                        templet: function(data) {

                            return (JSON.parse(data.context)).s6
                        }
                    }, {
                        field: 's3',
                        sort: true,
                        title: '状态',
                        templet: function(data) {
                            var ret = ''
                            if ((JSON.parse(data.context)).s3 == 1) {
                                ret = '未查看'
                            } else if ((JSON.parse(data.context)).s3 == 2) {
                                ret = '已查看'

                            } else if ((JSON.parse(data.context)).s3 == 3) {
                                ret = '处理中'

                            } else if ((JSON.parse(data.context)).s3 == 4) {
                                ret = '已处理'

                            }

                            return ret
                        }
                    }, ]
                ],
            });
        }

    });
</script>